using UnityEditor;
using UnityEngine;


[CustomEditor(typeof(MainLine))]
public class MainLineEditor : Editor
{
    public override void OnInspectorGUI()
    {
        var t = (MainLine) target;
        EditorGUILayout.Separator();
        GUILayout.Label("Basic Data", EditorStyles.boldLabel);
        t.Speed = EditorGUILayout.FloatField(new GUIContent("Speed", "Distance covered per second"), t.Speed);
        
        t.Color = EditorGUILayout.ColorField(
            new GUIContent("Color",
                "Color of currently attached material(" + t.MeshRenderer.sharedMaterial.name + ")."), t.Color);
        EditorGUILayout.Separator();
    }
}